package com.gps.cms.dao.impl;

import com.gps.cms.dao.IJobsDAO;
import com.gps.cms.model.Jobs;

import java.util.List;
import javax.annotation.Resource;
import org.hibernate.SessionFactory;

public class JobsDAOImpl implements IJobsDAO {

        
	private SessionFactory sessionFactory;

	
	public SessionFactory getSessionFactory() {
		return sessionFactory;
	}

        @Resource(name = "SecondSessionFactory")
	public void setSessionFactory(SessionFactory sessionFactory) {
		this.sessionFactory = sessionFactory;
	}

	@Override
	public void addJobs(Jobs jobs) {
		// TODO Auto-generated method stub
		
	}

	@Override
	public void updateJobs(Jobs jobs) {
		// TODO Auto-generated method stub
		
	}

	@Override
	public void deleteJobs(Jobs jobs) {
		// TODO Auto-generated method stub
		
	}

	@Override
	public Jobs getJobsById(int id) {
		// TODO Auto-generated method stub
		return null;
	}

	@Override
	public List<Jobs> getJobss() {
		// TODO Auto-generated method stub
		List list = getSessionFactory().getCurrentSession().createQuery("from Jobs").list();
		return list;
	}

}
